// https://leetcode.cn/problems/array-partition/
// Created by ade on 2022/8/9.
//
#include <iostream>
#include <vector>


using namespace std;

class Solution {
public:
    int arrayPairSum(vector<int>& nums) {
        sort(nums.begin(), nums.end());
        int sum = 0;
        for(int i = 0; i < nums.size(); i = i + 2){
            sum += nums[i];
        }
        return sum;
    }
};

int main(){
}